﻿namespace Super.Hmi.IServices
{
    /// <summary>
    /// 弹窗服务接口类
    /// </summary>
    public interface IDialogService
    {
        /// <summary>
        /// 不需要结果展示 不卡线程
        /// </summary>
        /// <param name="viewName">窗体名称</param>
        /// <param name="parameters">参数</param>
        void Show(string viewName, Dictionary<string, object> parameters = null);
        /// <summary>
        /// 需要结果展示 卡线程
        /// </summary>
        /// <param name="viewName">窗体名称</param>
        /// <param name="parameters">参数</param>
        /// <returns>返回结果</returns>
        Dictionary<string, object> ShowDialog(string viewName, Dictionary<string, object> parameters = null);
        /// <summary>
        /// 需要结果展示 不卡线程 异步
        /// </summary>
        /// <param name="viewName">窗体名称</param>
        /// <param name="parameters">参数</param>
        /// <returns>返回结果</returns>
        Task<Dictionary<string, object>> ShowDialogAsync(string viewName, Dictionary<string, object> parameters = null);
    }
}
